<form action="index.php?app=wap&amp;ctl=admin_activity&amp;act=add" id='newcurrency-edit-form' method="POST">
  <div class="tableform">
    <div class="division">
      <table width="100%" cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
          <tr>
            <th><em class="red">*</em><label for="activity_name"><{t}>活动名称:<{/t}></label></th>
            <td><input type="text" name="activity_name" id="activity_name" required="1" vtype="required" title="<{t}>活动名称:<{/t}>" class="x-input " autocomplete="off" value="<{$activity_name}>"></td>
          </tr>
            <th><em class="red">*</em><label for="dom_el_2a317d0"><{t}>对应活动页:<{/t}></label></th>
            <td>
              <{if $tmpl}>
              <select id="dom_el_2a317d0" name="tmpl_id" required="1" vtype="required" type="select" title="<{t}>活动页:<{/t}>" class="x-input-select inputstyle">
                <{foreach from=$tmpl item=val key=key}>
                <option value="<{$val.id}>"<{if $tmpl_id == $val.id}> selected="selected"<{/if}>><{$val.tmpl_name}></option>
                <{/foreach}>
              </select>
              <{/if}>
          </tr>
        </tbody>
      </table>
    </div>
  </div>

  <{if $activity_id}>
    <input type="hidden" name="activity_id" value="<{$activity_id}>" />
  <{/if}>
</form>

<{area inject=".mainFoot"}>
  <div class="table-action">
    <table width="100%" cellspacing="0" cellpadding="0">
      <tbody>
        <tr>
          <td>
            <{button class="btn-primary" id="newcurrency-edit-form-submit" type="submit" label=$___b2c="确定"|t:'b2c'}>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
<{/area}>

<script>
(function(){
  var _form = $('newcurrency-edit-form');
  var btn =$('newcurrency-edit-form-submit');
  var finder = finderGroup['<{$env.get._finder.finder_id}>'];
  _form.store('target',{
    onComplete:function(){
      try{
        var _dialogIns = btn.getParent('.dialog').retrieve('instance');
         }catch(e){}
        if(_dialogIns){
          _dialogIns.close();
          finder.refresh.delay(400,finder);
      }
    }
  });
      btn.addEvent('click',function(){
        _form.fireEvent('submit',{stop:$empty});
    });
})();
</script>